********************************************************************************
*Project:  	Swiss Trade During the Covid-19 Pandemic: An Early Appraisal	
*Authors:	KB, SL, VP, PW											
*This File: Figure 7a
*Version: 	vFinal						
*Date: 		2020-09-01				
********************************************************************************


import excel "$root\data\Country_Data_Other\protectionism.xlsx", 				///
sheet("Data") clear

drop H-L

rename A year
rename B lib_ch_row
rename C lib_row_ch
rename D prot_ch_row
rename E prot_row_ch
rename F saldo_ch_row
rename G saldo_row_ch

gen n=_n
drop if n<=3
drop if n>15
drop n

foreach var of varlist _all {
	destring `var', replace
}

clonevar yl=year
tostring yl, replace
gen ml="January - July"
gen year_label=ml+yl
drop yl ml

replace saldo_ch_row=saldo_ch_row+2


graph bar (first) saldo_row_ch (first) saldo_ch_row if year>2017, over(year_label)	///
ytitle("Balance Trade Interventions:" "# Liberalising Policies - # Harmful Policies")	///
yscale(range (-25 50)) ylabel(-250(50)50, nogrid) 								///
yline(0, lcolor(black))															///
legend(label(1 "Trade Partners vis-à-vis Switzerland") 							///
label(2 "Switzerland vis-à-vis Trade Partners") cols(1))						///								
bar(1, fcolor(gs12) lcolor(black)) bar(2, fcolor(maroon*0.8) lcolor(black))		///
scheme(s1color)
graph export "${root}\figures\FIG7a_protectionism_2018_2020.png", replace	
graph export "${root}\figures\FIG7a_protectionism_2018_2020.pdf", replace	
